<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
    <div id='app'>
        {{msg}}
        <input type="text" v-aa='msg' v-cc v-dd>
    </div>

    <script type='text/javascript'>

        Vue.directive('aa', {
            inserted(el, binding) {
                console.log(binding.value, 7788);
                // el.style.color='red'
                // el.focus() 
                el.value = binding.value
            },
        })

        // Vue.directive('bb',{
        //     inserted(el){
        //         console.log(el,7788);
        //         el.style.color='green'
        //     },
        // })

        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue123'
            },
            methods: {},
            directives: {
                cc:{
                    inserted(el){
                        console.log(el,44444);
                        el.style.border='2px  solid  red'
                        
                    }
                },
                dd:{
                    inserted(el){
                        console.log(el,777);
                        el.style.display='block';
                        el.style.height='80px';
                    }
                }
            }
        });

    </script>
</body>

</html>